package com.youmeek.demo.web.servlet.Test;

public class FactoryPattern {
    public static void main(String[] args) {
        NewProject newProject = getShape("CAT");
        newProject.newThis();
    }

    public static NewProject getShape(String shapeType){
        if(shapeType == null){
            return null;
        }
        if(shapeType.equalsIgnoreCase("CAT")){
            return new Cat();
        }
        return null;
    }


}
